package com.zy.algorithm.v3.sort;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.zy.activity.BaseFragment;
import com.zy.algorithm.v3.R;
import com.zy.utils.data.Point;
import com.zy.view.sort.DIYSortView;

import java.util.Random;


//桶排序
public class BucketSortFragment extends BaseFragment {

    @Override
    protected int getLayout() {
        return R.layout.fragment_sort_merge;
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        DIYSortView diy_v4 = view.findViewById(R.id.sort_view);
        int[] array = new int[]{900, 800, 600, 500, 300, 100, 200, 400, 700};


        diy_v4.setD(200);
        diy_v4.create(2, 1, array, Point.Type.DEFAULT);
        //diy_v4.addAss(d, 2, 1, "V", per);


        int[] assistArray = new int[]{1, 2, 3,};
        diy_v4.addAssistNode(3, 4, "1");
        diy_v4.addAssistNode(6, 4, "2");
        diy_v4.addAssistNode(9, 4, "3");

    }
}
